package com.qf.service;

import java.util.Map;
import java.util.Set;

/**
 * @author lenovo
 * @version V1.0
 * @Date 2021/11/19 14:26
 */
public interface CacheService {

    /**
     * 向redis中存入String-String数据
     * @param key
     * @param value
     * @param expireSecond
     * @return
     */
    boolean set(String key,String value,Long expireSecond);

    /**
     * 从redis中取String数据
     * @param key
     * @return
     */
    String get(String key);

    // 存储key-value结构,value类型为String,并且设置生存时间
    public boolean saveObject(String key, Object value);

    public Object getObject(String key);

    public boolean del(String... keys);

    public boolean hMSet(String key, Map map);

    public Map hMGet(String key);

    public boolean saveCache(String key, String value);

    public Long incr(String key, long delta);

    public boolean sadd(String key, String... value);

    public Object hget(String key,String field);

    public Long hincr(String key, String field, long delta);

    public Set<String> setGet(String key);

    Boolean setSet(String key, Set<String> value);

    Set<String> interSet(Set<String> value);


}


